From: Cosimo Cecchi Date: Mon, 18 Feb 2013 06:24:40 +0000 (-0500) Subject: overviewControls: fix math for translations when sliding in X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~4791 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=4505c38b5882cd867d661ff7aeb3a54830652d7f;p=gnome-shell.git overviewControls: fix math for translations when sliding in The math to compute translations was wrong when sliding in; also, don't depend on the slide value for the translation anymore. https://bugzilla.gnome.org/show_bug.cgi?id=694064 --- diff --git a/js/ui/overviewControls.js b/js/ui/overviewControls.js index f1e06873a..f96502029 100644 --- a/js/ui/overviewControls.js +++ b/js/ui/overviewControls.js @@ -125,14 +125,12 @@ const SlidingControl = new Lang.Class({ _getTranslation: function() { let child = this.actor.get_first_child(); let direction = getRtlSlideDirection(this.layout.slideDirection, child); - - let slide = this.getSlide(); let visibleWidth = this.getVisibleWidth(); if (direction == SlideDirection.LEFT) - return ((slide - 1) * visibleWidth); + return - visibleWidth; else - return ((1 - slide) * visibleWidth); + return visibleWidth; }, _updateTranslation: function(slidingIn) {